#!/bin/sh

dockerid=`docker ps -a --no-trunc --filter name=source-admin| grep -v CONTAINER | awk '{print $1}'`

if [[ -n "$dockerid" ]]; then
    docker stop $dockerid && docker rm $dockerid
fi

docker run -d --name source-admin \
-v /var/log/ruoyi:/var/log/ruoyi \
-v /opt/backend/source-admin.jar:/opt/backend/source-admin.jar \
-p 8021:8088 \
--restart=always \
-m 2Gi \
--memory-reservation 128Mi \
--cpus 1 \
source-admin:1.0
